@extends('layouts.admin')

@section('content')
<link rel="stylesheet" href="/assets/css/jquery-ui-1.10.3.custom.min.css" />
<style type="text/css">
.delegate{margin:10px;}
</style>
<div class="page-content">

    <div class="row">

        <div class="col-xs-12">
            <div class="panel panel-default">
                <div class="panel-heading">新增一篇模板</div>
                <div class="panel-body">

                    @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            <strong>新增失败</strong> 输入不符合要求<br><br>
                            {!! implode('<br>', $errors->all()) !!}
                        </div>
                    @endif

                    <form action="{{ url('template') }}" method="POST" name="my_form" enctype="multipart/form-data">
                        {!! csrf_field() !!}
                        <input type="text" name="title" class="form-control" required="required" placeholder="请输入模板名称">
                        <br>
                        <input type="file" name="template">
                        <div class="hr hr-double dotted"></div>
                        <button class="btn btn-lg btn-info">新增模板</button>
                    </form>

                </div>
            </div>

        </div>
    </div>
</div>
@endsection